<?php
/**
 * Created by PhpStorm.
 * User: fyl
 * Date: 2016/11/23
 * Time: 14:14
 */

/**
 * Class Involved_ExperItemModel
 */

class Involved_ExperItemModel extends BaseModel
{

    protected $table = 'exper_item';


    /**
     * 体验标列表
     * @return mixed
     */
    public function ItemNewList()
    {
        return  DB::table($this->table)
            ->select()
            ->paginate(10);
    }

    /**
     * 首页展示体验标
     * @return mixed
     */
    public function TiYanItemList()
    {
        return  DB::table($this->table)
            ->select('auto_id','exper_name','deadline','exper_amount','expect_rate')
            ->orderBy('auto_id','desc')
            ->first();

    }

    /**
     * 修改获取体验标信息
     * @param $auto_id
     * @return mixed
     */
    public function GetItemNewInfo($auto_id)
    {
        return  DB::table($this->table)
            ->select()
            ->where('auto_id',$auto_id)
            ->first();
    }

    /**
     * 体验标详情
     * @return mixed
     */
    public function Tiyan()
    {
        return  DB::table($this->table)
            ->select()
            ->orderBy('auto_id','desc')
            ->first();
    }

    /**
     * Api体验标详情
     * @return mixed
     */
    public function ApiTiyan()
    {
        return  DB::table($this->table)
            ->select('auto_id','exper_name','deadline','exper_amount','expect_rate')
            ->orderBy('auto_id','desc')
            ->first();
    }



}